{{define "mobile/ordinary/inspection.html"}}
    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
        <meta name="format-detection" content="telephone=no">
        <title>检查记录</title>
        <link rel="stylesheet" type="text/css" href="/res/mobile/css/weui.css"/>
        <link rel="stylesheet" type="text/css" href="/res/mobile/css/example.css"/>
        <link rel="stylesheet" type="text/css" href="/res/mobile/css/bootstrap.min.css"/>
        <link rel="stylesheet" type="text/css" href="/res/mobile/css/base.css?v=2"/>
    </head>
    <body ontouchstart>
    <div class="header">检查记录</div>
    <div class="container" id="container">
        <div class="page flex tabbar js_show">
            <div class="page__bd" style="height: 100%;">
                <div class="weui-tab">
                    <div class="weui-tab__panel">

                    </div>
                    <!-- 导航start -->
                    {{template "mobile/ordinary/tabbar.html"}}
                    <!-- 导航end -->
                </div>
            </div>
        </div>
    </div>
    <script type="text/javascript" src="/res/mobile/js/zepto.min.js"></script>
    <script type="text/javascript" src="/res/mobile/js/jweixin-1.0.0.js"></script>
    <script type="text/javascript" src="/res/mobile/js/weui.min.js"></script>
    <!-- <script type="text/javascript" src="/res/mobile/js/example.js"></script> -->
    <script type="text/javascript" src="/res/mobile/js/jquery-3.2.1.min.js"></script>
    <script type="text/javascript" class="tabbar js_show">
        $(function () {
            $(".weui-tabbar").find("a:eq(2)").addClass('weui-bar__item_on').siblings('.weui-bar__item_on').removeClass('weui-bar__item_on');
            //获取用户信息
            $.post("/mobile/ordinary/getUserData", {listSY: "A"}, function (r) {
                if (r) {
                    if (r.code != 1) {
                        window.location.href = "/mobile/ordinary/login"
                    } else {
                        var insHtml = '';
                        if (r.data != null && r.data.length > 0) {
                            for (var i = r.data.length - 1; i >= 0; i--) {
                                var baseInfo = r.data[i]["baseInfo"];
                                var ccRR = r.data[i]["ccRiskRating"];
                                var createTime = r.data[i]["createTime"];
                                insHtml += '<div class="page__bd page__bd_spacing">'
                                    + '<div class="personal">检查记录</div>'
                                    + '<div class="_cut"></div>'
                                    + '<div class="weui-flex">'
                                    + '<div class="weui-flex__item">'
                                    + '<div class="placeholder">姓名：</div>'
                                    + '</div>'
                                    + '<div class="weui-flex__item">'
                                    + '<div class="placeholder" id="baseInfo_UserName">' + baseInfo.userName + '</div>'
                                    + '</div>'
                                    + '<div class="weui-flex__item">'
                                    + '<div class="placeholder">性别：</div>'
                                    + '</div>'
                                    + '<div class="weui-flex__item">'
                                    + '<div class="placeholder" id="baseUserInfo_Sex">' + (baseInfo.userSex == undefined ? "" : baseInfo.userSex) + '</div>'
                                    + '</div>'
                                    + '</div>'
                                    + '<div class="weui-flex">'
                                    + '<div>'
                                    + '<div class="placeholder">检查时间：</div>'
                                    + '</div>'
                                    + '<div class="weui-flex__item">'
                                    + '<div class="placeholder" id="screenDate">' + createTime + '</div>'
                                    + '</div>'
                                    + '</div>'
                                    + '<div class="weui-flex">'
                                    + '<div class="">'
                                    + '<div class="placeholder">检查地点：</div>'
                                    + '</div>'
                                    + '<div class="weui-flex__item">'
                                    + '<div class="placeholder" id="screenOrganCode">' + baseInfo.screenOrganCode + '</div>'
                                    + '</div>'
                                    + '</div>'
                                    + '<div class="weui-flex">'
                                    + '<div class="">'
                                    + '<div class="placeholder">脑卒中风险等级：</div>'
                                    + '</div>'
                                    + '<div class="weui-flex__item">'
                                    + '<div class="placeholder p_red" id="baseUserInfo_RiskLevel">' + ccRR.risk_level + '</div>'
                                    + '</div>'
                                    + '</div>'
                                    + '</div>'
                            }
                            $(".weui-tab__panel").html(insHtml);
                        }

                    }
                } else {
                    window.location.href = "/mobile/ordinary/login"
                }
            })
        });
    </script>

    </body>
    </html>
{{end}}